home *** CD-ROM | disk | FTP | other *** search
- Path: noc.tor.hookup.net!the-fix.sos.on.ca
- From: <verneb@the-fix.sos.on.ca>
- Date: Wed,17 Jan 96 17:34:44 -0500
- Newsgroups: comp.lang.c
- Subject: What should be returned?
- Message-ID: <tcpnntpd.16.1.17.17.34.44.2781597121.346998@the-fix.sos.on.ca>
- References: <4dj8pv$cjd@eng_ser1.erg.cuhk.hk>
- Organization: the FIX - Kitchener, Ontario CANADA
- NNTP-Posting-Host: the-fix.sos.on.ca
- X-MajorTCP-Version: MajorTCP/IP [1.80-0]
-
- To: INT:phsung@cs.cuhk.hk
-
- Int:phsung@cs.cuhk.hk,
-
- I >Hi, all,
- I >
- I > It's said that the function main must return an integer value
- I >but I just don't know what value should be returned. Also, if I quit
- I >main by exit(), what's the use of the return value?
- I >
- I > Any help?
- I >
- I >--
- I >Regards,
- I >Sung, the CAReLess boy º║─_▒d (Ñd║╕)
- I >CUHK UC CSC Yr2 ¡╗┤öñññÖñj╛Ä ┴pªX«Ñ░| ¡p║î╛≈¼∞╛ÄÑD¡╫
- I >
- I >
-
- simply use return 0; and that will satisfy your compiler e.g.
-
- #include <stdio.h>
- int main(void)
- {
- printf("This should work I think, I hope, I know it will!\n");
- return 0;
- }
-
- Main is asking for nothing so you return the same by 'return 0;'.
-
- Verne H. Bohlender
- Box 416, Chesley, Ontario.Ca. N0G 1L0
- verneb@The-Fix.sos.on.ca
- ___
- * UniQWK #2158*
-
-